package vip.liux.backend.application.service.point;

import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;

@Getter
@Setter
public class PointsRechargeDto {
    @NotNull
    private Long userId; // 用户ID

    @NotNull(message = "扣除积分不能为空")
    @DecimalMin(value = "0.01", message = "扣除积分必须大于0")
    private BigDecimal points; // 充值积分数量

    @NotBlank(message = "订单编号不能为空")
    private String orderNo; // 订单编号

    private String description; // 描述信息

    public PointsRechargeDto(Long userId, BigDecimal points, String orderNo, String description) {
        this.userId = userId;
        this.points = points;
        this.orderNo = orderNo;
        this.description = description;
    }
}